package mybatis.testDemo.sqlProvider;

import cn.hutool.core.lang.Assert;
import com.alibaba.druid.sql.parser.SQLSelectParser;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.type.JdbcType;
import sample.mybatis.mapper.MapperInterface;

import java.lang.reflect.InvocationTargetException;

@Slf4j
public class SqlProvider {
    /**
     * replace, org.apache.ibatis.type.JdbcType.varchar
     */
    public String getSql(@Param("val") String val) {

        return "select #{val , jdbcType=VARCHAR}";
    }

    public String getSqlProperties(@Param("val") String val) {
        return "select ${val}";
    }

}
